<?php
require_once '../data/user.php';

if (isset($_POST["supmit"])) {
    $dau = FALSE;
    for ($i = 0; $i < count($users); $i++) {
        if (strcmp($_POST["username"], $users[$i]["username"]) == 0 && strcmp($_POST["password"], $users[$i]["password"]) == 0) {
            $dau = TRUE;
            break;
        } else {
            $dau = FALSE;
        }
    }
        if ($dau == TRUE) {
            echo "Ban Da Thanh Cong";
        } else {
            echo "Ban Sai Roi  
            <a href='login.php'> Back </a>";  
        }
}

?>

<!--<div class="check">aaaaaaa</div>
<script type="text/javascript">
        $(".check").click(function(){
                $(this).text('Save Username')
        });
    </script>-->
